From: Carol (Nichols || Goulding) Date: Sun, 15 May 2016 14:39:40 +0000 (-0400) Subject: Clarify statements about ignoring/checking in Cargo.lock X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~14^2~7^2~5 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=4deac489bbe915332c2a2be28287547c9cafbe91;p=cargo.git Clarify statements about ignoring/checking in Cargo.lock --- diff --git a/src/doc/guide.md b/src/doc/guide.md index 5819878a9..15f87fcf8 100644 --- a/src/doc/guide.md +++ b/src/doc/guide.md @@ -247,8 +247,13 @@ about them, here’s a summary: * `Cargo.toml` is about describing your dependencies in a broad sense, and is written by you. * `Cargo.lock` contains exact information about your dependencies. It is maintained by Cargo and should not be manually edited. -* If you’re building a library, put `Cargo.lock` in your `.gitignore`. -* If you’re building an executable, check `Cargo.lock` into `git`. + +If you’re building a library that other projects will depend on, put +`Cargo.lock` in your `.gitignore`. If you’re building an executable like a +command-line tool or an application, check `Cargo.lock` into `git`. If you're +curious about why that is, see ["Why do binaries have `Cargo.lock` in version +control, but not libraries?" in the +FAQ](faq.html#why-do-binaries-have-cargolock-in-version-control-but-not-libraries). Let’s dig in a little bit more.